package com.pro.mapper;

import com.pro.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface JsUserMapper {

    /**
     * @author MYH - SiYun
     * @date 2022/1/6 18:37
     * 登录
     */
    public JsUser getUser(@Param("account")String account,@Param("password")String password);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/6 19:03
     * 获取用户账号与密码
     */
    public JsUser getAccount(String account);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 9:47
     * 获取后台人员列表
     */
    public List<JsUser> getUserList(JsUser jsUser);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 10:50
     * 高级检索后台人员列表
     */
    public List<JsUser> getUserListRetrieval(JsUser jsUser);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 10:56
     * 修改用户禁用启用状态
     */
    public boolean updateJsUserEnabled(@Param("userId") Integer userId,@Param("enabled") Integer enabled);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 10:57
     * 修改用户账号封停启用状态
     */
    public boolean updateJsUserStatus(@Param("userId")Integer userId,@Param("status")Integer status);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 14:38
     * 根据userId修改用户信息
     */
    public boolean updateJsUser(JsUser jsUser);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 16:40
     * 根据userId查看用户权限
     */
    public List<Integer> getJsUserPower(Integer userId);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 19:54
     * 根据userId删除用户权限
     */
    public boolean deleteJsUserPower(Integer userId);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/12 20:02
     * 添加用户权限
     */
    public boolean addJsUserPower(JsRoleAuthority jsRoleAuthority);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/13 9:47
     * 查询所有部门
     */
    public List<JsDept> getJsDept();

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/13 11:44
     * 根据部门id查询user
     */
    public List<JsDept> getJsUserById(Integer id);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/13 11:53
     * 根据部门id修改部门名称
     */
    public boolean updateJsDeptNameById(@Param("id") Integer id,@Param("deptName")String deptName);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/13 14:33
     * 根据部门id删除部门
     */
    public boolean deleteJsDeptById(Integer id);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/14 9:42
     * 导入后台人员
     */
    public boolean importJsUser(List<JsUser> jsUsers);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/14 11:34
     * 查询所有后台用户账号
     */
    public List<String> getJsUserAccount();

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/14 14:01
     * 添加后台用户
     */
    public boolean addJsUser(JsUser jsUser);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 8:47
     * 根据账号查询userid
     */
    public Integer getJsUserByAccount(String account);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 8:53
     * 添加用户同时添加部门
     */
    public boolean addJsUserDept(@Param("userId") Integer userId,@Param("deptId")Integer deptId);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 10:22
     * 查询所有后台解封日志
     */
    public List<JsUnseal> getJsUnseal(JsUnseal jsUnseal);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 10:41
     * 根据id删除后台解封日志
     */
    public boolean deleteJsUnseal(Integer id);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 11:01
     * 查询所有部门
     */
    public List<JsDept> getJsDeptList(JsDept jsDept);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 14:05
     * 根据部门id修改部门状态
     */
    public boolean updateJsDeptStatus(@Param("id") Integer id,@Param("status")Integer status);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/15 13:59
     * 根据部门id修改部门信息
     */
    public boolean updateJsDept(JsDept jsDept);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/21 15:13
     * 查询所有后台登录日志
     */
    public List<JsLoginRecord> getBackStageLogin(JsLoginRecord jsLoginRecord);

    /**
     *
     * @author MYH - SiYun
     * @date 2022/1/21 15:33
     * 根据id删除登录日志
     */
    public boolean deleteLoginRecord(Integer id);

    /**
     * @Author 祖铭泽
     * @Date 2022/2/22/0022
     * @description 为用户添加部门
     */
    boolean addUsersDept(List<JsUser> jsUsers);
    /**
     * @Author 祖铭泽
     * @Date 2022/2/23/0022
     * @description 添加部门
     */
    boolean addDept(JsDept dept);
    /**
     * @Author 祖铭泽
     * @Date 2022/2/27/0022
     * @description 根据账号获取id
     */
    Integer getUserIdByAccount(String account);
}
